//
//  CYButton.h
//  CaiYun
//
//  Created by 今日信息科技 on 2017/9/9.
//  Copyright © 2017年 今日信息科技. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef NS_ENUM(NSUInteger , CYButtonImageViewPosition){
    LeftPosition = 1,
    RightPosition,
    TopPosition,
    DownPosition
};
@interface CYButton : UIButton
@property (nonatomic, assign) CYButtonImageViewPosition imagePosition;
/**
 * @pragma title:button的title，
 * @pragma titlecolor:字体颜色，
 * @pragma backgroundcolor:背景颜色，radius:button的圆角半径，
 */
- (instancetype)initWithTitle:(NSString *)title titleColor:(UIColor *)color backgroundColor:(UIColor *)tintcolor cornerRadius:(CGFloat)radius;
/**
 * @pragma title:button的title，
 * @pragma titlecolor:字体颜色，
 * @pragma size 字体大小
 * @pragma image 按钮图片
 */
- (instancetype)initWithTitle:(NSString *)title titleColor:(UIColor *)color titleSize:(CGFloat)size Image:(NSString *)image;
/**
 * @pragma title:button的title，
 * @pragma titlesize:字体大小，
 * @pragma radius:button的圆角半径;
 */
- (instancetype)initWithTitle:(NSString *)title titlesize:(CGFloat)size cornerRadius:(CGFloat)radius;

/**
 * @pragma image:button的imageName，
 * @pragma radius:button的圆角半径;
 */
- (instancetype)initWithImage:(NSString *)image cornerRadius:(CGFloat)radius;

- (void)setBackgroundColor:(UIColor *)backgroundColor forstate:(UIControlState)state;
@end
